/** 商城相关 */
import request from '@/utils/request'

// 商品分类
export function goodsType(params) {
	return request({
		url: '/technicianapp/Matter/cate',
		method: 'get',
		params
	})
}

// 商品列表
export function goodsList(params) {
	return request({
		url: '/technicianapp/Matter/goods',
		method: 'get',
		params
	})
}

// 地址列表
export function addressList(params) {
	return request({
		url: '/technicianapp/Matter/addressList',
		method: 'get',
		params
	})
}

// 地址详情
export function addressDetail(params) {
	return request({
		url: '/technicianapp/Matter/addressDetails',
		method: 'get',
		params
	})
}

// 删除地址
export function addressDelete(params) {
	return request({
		url: '/technicianapp/Matter/addressDel',
		method: 'get',
		params
	})
}

// 更新地址
export function addressUpdate(data) {
	return request({
		url: '/technicianapp/Matter/addressEdit',
		method: 'post',
		data
	})
}	

// 结算
export function settlement(data) {
	return request({
		url: '/technicianapp/Matter/settlement',
		method: 'post',
		data
	})
}

// 创建订单
export function orderCreate(data) {
	return request({
		url: '/technicianapp/Matter/createOrder',
		method: 'post',
		data
	})
}

// 订单支付
export function orderPay(data) {
	return request({
		url: '/technicianapp/Matter/pay',
		method: 'post',
		data
	})
}

// 订单支付状态
export function orderPayStatus(data) {
	return request({
		url: '/technicianapp/Matter/isPay',
		method: 'post',
		data
	})
}

// 订单列表
export function orderList(data) {
	return request({
		url: '/technicianapp/Matter/orderList',
		method: 'post',
		data
	})
}

// 订单详情
export function orderDetail(data) {
	return request({
		url: '/technicianapp/Matter/orderDetails',
		method: 'post',
		data
	})
}

// 取消订单
export function orderCancel(params) {
	return request({
		url: '/technicianapp/Matter/cancelOrder',
		method: 'get',
		params
	})
}

// 确认收货
export function orderReceipt(params) {
	return request({
		url: '/technicianapp/Matter/completeOrder',
		method: 'get',
		params
	})
}